package com.design03_behavioral.pattern22_interpreter.example02;

/**
 * @ClassName 除法
 * @Description TODO
 * @Author 22963
 * @DATE 2023/9/11 0:31
 */
public class DivExpression implements Expression {

    private Expression exp1;

    private Expression exp2;

    public DivExpression(Expression exp1, Expression exp2) {
        this.exp1 = exp1;
        this.exp2 = exp2;
    }

    @Override
    public long interpret() {
        return exp1.interpret() / exp2.interpret();
    }

}
